﻿<dialogs:DialogWindow x:Class="Modules.DatabaseSettings.Views.DbSettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:commands="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
             xmlns:commonCommands="clr-namespace:Common.Commands;assembly=Common.Commands"
             xmlns:controls="clr-namespace:Common.Controls.Controls;assembly=Common.Controls"
             xmlns:dialogs="clr-namespace:Common.Dialogs;assembly=Common.Dialogs"
             xmlns:commonConverters="clr-namespace:Common.Dialogs.Converters;assembly=Common.Dialogs"
             xmlns:regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation" 
             mc:Ignorable="d" 
             WindowStyle="None" AllowsTransparency="True" ResizeMode="NoResize"
             Background="Transparent" WindowStartupLocation="CenterScreen"
             WindowResult="{Binding DialogResult}" Closing="DialogWindow_Closing"
             Height="411" Width="574">
    <dialogs:DialogWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Common.Dialogs;component/Styles/CommonStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </dialogs:DialogWindow.Resources>
    <Grid x:Name="LayoutRoot"
          controls:BusyIndicatorBehavior.AddMargins="True" 
          controls:BusyIndicatorBehavior.BusyState="{Binding IsBusy}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="HeaderBorder" Grid.Row="0" BorderThickness="2,2,2,0" CornerRadius="10,10,0,0" BorderBrush="Black" Background="SteelBlue"
                MouseDown="HeaderBorder_MouseDown"
                >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel HorizontalAlignment="Left" Grid.Column="0">
                    <TextBlock Text="Database settings" Style="{StaticResource DialogHeaderTextStyle}"/>
                </StackPanel>
                <StackPanel HorizontalAlignment="Right" Grid.Column="1">
                    <Button VerticalAlignment="Center" Margin="8" Style="{StaticResource CloseButtonStyle}" IsCancel="True">
                        <Button.Content>
                            <Image Source="/Common.Dialogs;component/Images/305_Close_16x16_72.png" Width="12" Height="12"/>
                        </Button.Content>
                    </Button>
                </StackPanel>
            </Grid>
        </Border>
        <Border Grid.Row="1" BorderThickness="2,0,2,2" CornerRadius="0,0,4,4" BorderBrush="Black" Background="LightGray">
            <ContentControl Grid.Row="1" regions:RegionManager.RegionName="DbSettingsRegion"/>
        </Border>
    </Grid>
</dialogs:DialogWindow>
